<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title>${title}</title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<#include "common/am.reference.ftl" />
	</head>
	<body class="${configs["skinName"]}">
		<div class="page-content">
			<div class="row">
			<#include "common/breadcrumb.ftl">
				<form id="form" role="form" class="form-horizontal" method="post" action="${base}/${form_action}">
					<div class="col-xs-12">
						<div class="widget-box">
							<div class="widget-body">
								<input type="hidden" name="serviceId" id="serviceId" value="${serviceId}">
								<div class="alert alert-warning">
									<strong>提示!</strong>
									<strong style="color:#dd514c;">出现红框</strong>的表示不能为空
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										服务业务名称
									</label>
									<div class="col-sm-6">
										${serviceName}
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										支付定金比例
									</label>
									<div class="col-sm-6 input-group">
										<input type="text" id="payDepositRatio" name="payDepositRatio" value="${model.payDepositRatio}" class="form-control js-pattern-number" required min="0.0" placeholder="请输入支付定金比例">
										<span class="input-group-addon">%</span>
									</div>
								</div>
								<#if carRankList?exists && carRankList?size gt 0 && roadLineList?exists && roadLineList?size gt 0>
									<#assign index = 0>
									<#list roadLineList as line >
										<#list carRankList as carRank>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										[${line.roadName}]-[${carRank.dataValue}]单价
									</label>
									<div class="col-sm-6 input-group">
										<input type="hidden" name="roadPrices[${index}].roadId" value="${line.roadId}">
										<input type="hidden" name="roadPrices[${index}].carType" value="${carRank.dataValue}">
										<input type="text" name="roadPrices[${index}].kmPrice" value="${getCarRank(carRank.dataValue, line.roadId) }" class="form-control js-pattern-number" required min="0.0" placeholder="请输入单价">
										<span class="input-group-addon">元/公里</span>
									</div>
								</div>
										<#assign index = index + 1>
										</#list>
									</#list>
									<#function getCarRank carRank roadId >
									<#if model.roadPrices?exists && model.roadPrices?size gt 0>
									<#list model.roadPrices as item>
									<#if item.carType == carRank && item.roadId == roadId >
									<#return item.kmPrice>
									</#if>
									</#list>
									<#else>
									<#return ''>
									</#if>
									</#function>
								</#if>
								<div class="clearfix form-actions">
									<div class="col-md-offset-3 col-md-9">
										<button id="btnSubmit" class="btn btn-info" type="submit">
											<i class="fa fa-check bigger-110"></i>
											提 交
										</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</form>
			</div>	
		</div>
		<script type="text/javascript">
		$(function(){
			$('#form').validator();
		})
		</script>
	</body>
</html>